import request from '@/utils/request'

// 查询故障管理信息列表
export function listFaultReport(query) {
  return request({
    url: '/equipment/faultReport/list',
    method: 'get',
    params: query
  })
}

// 查询故障管理信息详细
export function getFaultReport(id) {
  return request({
    url: '/equipment/faultReport/' + id,
    method: 'get'
  })
}

// 新增故障管理信息
export function addFaultReport(data) {
  return request({
    url: '/equipment/faultReport',
    method: 'post',
    data: data
  })
}

// 修改故障管理信息
export function updateFaultReport(data) {
  return request({
    url: '/equipment/faultReport',
    method: 'put',
    data: data
  })
}

// 获取故障信息记录
export function getRecord(id) {
  return request({
    url: '/equipment/record/list',
    method: 'get',
    params: {repairId:id}
  })
}

// 删除故障管理信息
export function delFaultReport(id) {
  return request({
    url: '/equipment/faultReport/' + id,
    method: 'delete'
  })
}
